import { axios } from '@/utils/request'

// 自动补全用户输入框
export function autoCompleteUserInfo(data, saas) {
  return axios({
    url: '/onlcode/saas/user/autoCompleteUserInfo',
    method: 'get',
    params: data,
    headers: {
      saas
    }
  })
}

// 分页查询用户信息列表
export function queryByPage(data, params, saas) {
  return axios({
    url: '/onlcode/saas/user/queryByPage',
    method: 'post',
    params,
    data,
    headers: {
      saas
    }
  })
}

// 启用/禁用用户
export function enableOrDisable(data, saas) {
  return axios({
    url: '/onlcode/saas/user/enableOrDisable',
    method: 'post',
    // data,
    params: data,
    headers: {
      saas
    }
  })
}

// 新增或修改用户信息
export function saveOrUpdate(data, saas) {
  return axios({
    url: '/onlcode/saas/user/saveOrUpdate',
    method: 'post',
    data,
    headers: {
      saas
    }
  })
}

// 根据id获取用户信息
export function getById(data, saas) {
  return axios({
    url: '/onlcode/saas/user/getById',
    method: 'get',
    params: data,
    headers: {
      saas
    }
  })
}